<template>
  <div class="c-circle" ref="circle-container">
    <data-v-chart style="height: 100%" @set-opt="onSet"></data-v-chart>
  </div>
</template>

<script>
/* eslint-disable no-unused-vars */

import opt1 from "./option";
// import opt2 from "./option2";
import ChartType2 from './chart2';

export default {
  name: "data-v-ring",
  props: {
    progress: {
      type: [Number, String],
      default: 60
    },
    type: {
      type: [Number, String],
      default: 1
    }
  },
  computed: {},
  created() {},
  data() {
    return {};
  },
  watch: {},
  mounted() {},
  methods: {
    onSet(chart) {
      this.chart = chart;
      if (this.type == 1) {
        chart.setOption(opt1);
      } else if (this.type == 2) {
        new ChartType2(chart);
      }
    }
  }
};
</script>

<style lang="less">
.c-circle {
  position: relative;
  height: 100%;
}
</style>
